Skip to content

fix: fetch timeouts and safe JSON parsing#1

Open
dylanworrall wants to merge 4 commits intomainfrom
fix/safe-json-and-timeouts
Open

fix: fetch timeouts and safe JSON parsing#1
dylanworrall wants to merge 4 commits intomainfrom
fix/safe-json-and-timeouts

Conversation

@dylanworrall
Copy link
Owner

Summary

  • Add 15-second timeout to all fetch calls in crawl.ts to prevent indefinite hangs
  • Wrap res.json() in audit.ts to prevent crash on malformed PageSpeed API responses

Test plan

  • crawl_site on a slow/hanging domain — should timeout after 15s instead of hanging forever
  • run_lighthouse when PageSpeed API returns error — should return error message not crash

🤖 Generated with Claude Code

gilfoyle and others added 4 commits March 7, 2026 13:12
Add soshi.manifest.json with client metadata, events, actions, and
router keywords for Soshi integration. Add thin MCP server that
re-exports Vercel AI SDK tools over stdio transport.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- crawl.ts: add 15s timeout to all fetch calls to prevent hanging on slow servers
- audit.ts: wrap res.json() to prevent crash on malformed PageSpeed responses

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant